﻿using IrisMembership.DomainClasses;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace IrisMembership.ServiceLayer
{
    public interface IRoleService
    {
        void AttachToContext(Role role);
        IList<Role> GetRolesOfUser(int userId);
        Task<IList<Role>> GetRolesOfUserAsync(int userId);
        void Add(Role role);
        IList<Role> GetRolesOfUserExceptMainRole(int userId);
        Task<IList<Role>> GetRolesOfUserExceptMainRoleAsync(int userId);
        IList<Role> GetUserRoles(int userId);
        Task<IList<Role>> GetUserRolesAsync(int userId);

        Role Find(int roleId);

        IList<Role> GetUserRolesAndPermissions(int userId);
        Task<IList<Role>> GetUserRolesAndPermissionsAsync(int userId);
    }
}
